<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@ page import="java.util.*" import="edu.scu.declaresys.vo.*"
	import="edu.scu.declaresys.config.*"
	import="edu.scu.declaresys.web.util.*;"%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<%
	User user = (User)session.getAttribute(User.T_TABLE);
%>
<div class="logo1">
	<%
	 		out.write(DynamicHtmlMaker.loginInfo(session));
	 	 %>
</div>
<div class="logo2"></div>
<div class="nav auto tc">
	<a href="indexNews.action" target="_black"><span class="nav_sty">首 页</span></a><span id="px"></span>
	<%
		StringBuffer sb = new StringBuffer();
		//个人中心
		
		
		boolean isEnable = false;
		//信息报送
		isEnable = (user != null) && !user.isSysAdmin();
		//sb.append("<a href=\"").append(isEnable ? "jsp/msg/msgWrite.jsp" : "#").append("\" target=\"_black\"><b><span class=\"nav_sty\">信息报送</span></b></a>");
		
		//项目申报管理
		isEnable = (user != null);
		String href = null;
		if(user != null)
		{
			sb.append("<a href=\"").append(user == null ? "#" : IActionName.PERSONAL_INFO).append("\" target=\"_black\"><span class=\"nav_sty\">个人中心</span></a>");
			if(user.isDeclarer())
			{
				href=IActionName.DECLARE_WRITE_PROJECT;
			}
			else if(user.isRecommender())
			{
				href=IActionName.RCMD_WAIT_RCMD_PROJECT;
			}
			else if(user.isAuditor())
			{
				href=IActionName.AUDIT_WAIT_AUDIT_PROJECT;
			}
			if(href != null)
			{
				sb.append("<a href=\"").append(href).append("\" target=\"_black\"><b><span class=\"nav_sty\">项目申报管理</span></b></a>");
			}
		}
		
		// 项目检索
		sb.append("<a href=\"").append(IActionName.SEARCH_SHOW_SEARCH_OPTION)
				.append("\" target=\"_black\"><b><span class=\"nav_sty\">项目检索</span></b></a>");
		
		//系统设置
		if((user != null) && user.isSysAdmin())
		{
			sb.append("<a href=\"").append(IActionName.USER_LIST).append("\" target=\"_black\"><b><span class=\"nav_sty\">系统设置</span></b></a>");
		}
		//输出
		out.write(sb.toString());
	%>
</div>


